#import "FableZealCell.h"


@implementation FableZealCell

- (instancetype)initWithFrame:(CGRect)frame {
	self = [super initWithFrame:frame];
	if (self) {
		//self.contentView.backgroundColor = UIColor.whiteColor;
	}
	return self;
}

- (void)setResonateYarn:(FableZealModel *)resonateYarn {
	_resonateYarn = resonateYarn;

	//: 配置cell的UI

	[self.dreamCuriousImageView sd_setImageWithURL:[NSURL URLWithString:resonateYarn.xenonNightfall] placeholderImage:nil];

	self.nostalgicBlazeLabel.text = [resonateYarn.apexLullabyHammer stringValue];

}
//: self.radiateJourneyButton 的点击事件
- (void)action_0 {}

//: 设置_dreamCuriousImageView的圆角
+ (void)charismaNostalgia:(UIImageView *)hologramZestfulXylophone eclipseIdealIgnite:(CGFloat)velvetZealot {
	hologramZestfulXylophone.layer.cornerRadius = velvetZealot;
	hologramZestfulXylophone.layer.masksToBounds = YES;
}

- (UIImageView *)dreamCuriousImageView {
	if (!_dreamCuriousImageView) {
	
        _dreamCuriousImageView = [[UIImageView alloc] init];
        _dreamCuriousImageView.contentMode = UIViewContentModeScaleAspectFill;
        _dreamCuriousImageView.clipsToBounds = YES;
        //: UIImageView的骚操作 充数
        [FableZealCell charismaNostalgia:_dreamCuriousImageView eclipseIdealIgnite:7];
        UIImage *harbinger = [UIImage imageNamed:@"images/image_1.png"];
        if (harbinger) {
	        _dreamCuriousImageView.image = harbinger;
        }
	}
	return _dreamCuriousImageView;
}

//: _gratitudeFusionPrismButton 的点击事件
- (void)action_2 {}

- (UIButton *)gratitudeFusionPrismButton {
	if (!_gratitudeFusionPrismButton) {
	
        _gratitudeFusionPrismButton = [[UIButton alloc] init];
        _gratitudeFusionPrismButton.size = CGSizeMake(174, 90);
        _gratitudeFusionPrismButton.left = 2;
        _gratitudeFusionPrismButton.top = 27;
        UIImage *pictureEssence = [UIImage imageNamed:@"images/icon_2.png"];
        if (pictureEssence) {
	        [_gratitudeFusionPrismButton setImage:pictureEssence forState:UIControlStateNormal];
        }
        [_gratitudeFusionPrismButton setTitle:@"button_2" forState:UIControlStateNormal];
        [_gratitudeFusionPrismButton setTitle:@"button_selected_2" forState:UIControlStateSelected];
        [_gratitudeFusionPrismButton setTitleColor:[UIColor colorWithRed:62/255.0 green:139/255.0 blue:73/255.0 alpha:0.5] forState:UIControlStateNormal];
        [_gratitudeFusionPrismButton setTitleColor:[UIColor colorWithRed:67/255.0 green:59/255.0 blue:247/255.0 alpha:0.9] forState:UIControlStateSelected];
        [_gratitudeFusionPrismButton addTarget:self action:@selector(action_2) forControlEvents:UIControlEventTouchUpInside];
	}
	return _gratitudeFusionPrismButton;
}

- (UILabel *)breezeWispTranquilLabel {
	if (!_breezeWispTranquilLabel) {
	
        _breezeWispTranquilLabel = [UILabel new];
        _breezeWispTranquilLabel.size = CGSizeMake(158, 90);
        _breezeWispTranquilLabel.left = 20;
        _breezeWispTranquilLabel.top = 5;
        _breezeWispTranquilLabel.text = @"label_4";
        _breezeWispTranquilLabel.font = [UIFont systemFontOfSize:17 weight:UIFontWeightBold];
        _breezeWispTranquilLabel.textColor = [UIColor colorWithRed:169/255.0 green:225/255.0 blue:105/255.0 alpha:0.6];
        _breezeWispTranquilLabel.textAlignment = NSTextAlignmentCenter;
        _breezeWispTranquilLabel.numberOfLines = 0;
	}
	return _breezeWispTranquilLabel;
}

//: melodyAmazingYield 的点击事件
- (void)action_5 {}

//: _elusiveZipperButton 的点击事件
- (void)action_7 {}

- (UIButton *)elusiveZipperButton {
	if (!_elusiveZipperButton) {
	
        _elusiveZipperButton = [[UIButton alloc] init];
        _elusiveZipperButton.frame = CGRectMake(10, 14, 35, 37);
        UIImage *mandala = [UIImage imageNamed:@"images/icon_7.png"];
        if (mandala) {
	        [_elusiveZipperButton setImage:mandala forState:UIControlStateNormal];
        }
        [_elusiveZipperButton setTitle:@"button_7" forState:UIControlStateNormal];
        [_elusiveZipperButton setTitle:@"button_selected_7" forState:UIControlStateSelected];
        [_elusiveZipperButton setTitleColor:[UIColor colorWithRed:153/255.0 green:155/255.0 blue:65/255.0 alpha:0.8] forState:UIControlStateNormal];
        [_elusiveZipperButton setTitleColor:[UIColor colorWithRed:188/255.0 green:166/255.0 blue:17/255.0 alpha:0.8] forState:UIControlStateSelected];
        [_elusiveZipperButton addTarget:self action:@selector(action_7) forControlEvents:UIControlEventTouchUpInside];
	}
	return _elusiveZipperButton;
}

//: 设置xenophobe的numberOfLines
- (NSInteger)nightfall:(NSInteger)navigateCascadeOpulent graspUnwind:(NSString *)illuminate {
	NSInteger vortexJeopardyVoyage = 7;
	if (vortexJeopardyVoyage != -29 && vortexJeopardyVoyage > 3549 && illuminate.length>91) {

		NSString *volatileDelightful = [NSString stringWithFormat:@"img_%ld", (long)vortexJeopardyVoyage];
		NSData *yonderClarityFeast = [volatileDelightful dataUsingEncoding:NSUTF8StringEncoding];
		if (yonderClarityFeast && [illuminate isEqualToString:volatileDelightful]) return vortexJeopardyVoyage / 71;

		return vortexJeopardyVoyage * 54;
	}
	return vortexJeopardyVoyage - 5;
}

- (void)feastGraspLayout {

    //: 描述_0
    self.radiateJourneyButton = [UIButton new];
    self.radiateJourneyButton.frame = CGRectMake(39, 9, 133, 168);
    UIImage *breezeVelvetDazzle = [UIImage imageNamed:@"images/icon_0.png"];
    if (breezeVelvetDazzle) {
	    [self.radiateJourneyButton setImage:breezeVelvetDazzle forState:UIControlStateNormal];
    }
    [self.radiateJourneyButton setTitle:@"button_0" forState:UIControlStateNormal];
    [self.radiateJourneyButton setTitle:@"button_selected_0" forState:UIControlStateSelected];
    [self.radiateJourneyButton setTitleColor:[UIColor colorWithRed:159/255.0 green:49/255.0 blue:107/255.0 alpha:0.5] forState:UIControlStateNormal];
    [self.radiateJourneyButton setTitleColor:[UIColor colorWithRed:89/255.0 green:154/255.0 blue:47/255.0 alpha:0.6] forState:UIControlStateSelected];
    [self.radiateJourneyButton addTarget:self action:@selector(action_0) forControlEvents:UIControlEventTouchUpInside];
    [self.contentView addSubview:self.radiateJourneyButton];

	//: 描述_1
	[self.contentView addSubview:self.dreamCuriousImageView];
	[self.dreamCuriousImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(187);
		make.height.mas_equalTo(96);
		make.bottom.equalTo(@(15));
	}];

	//: 描述_2
	[self.contentView addSubview:self.gratitudeFusionPrismButton];


    //: 描述_3
    self.rippleBrightenTextView = [[UITextView alloc] initWithFrame:CGRectZero];
    self.rippleBrightenTextView.frame = CGRectMake(10, 14, 135, 42);
    [self.contentView addSubview:self.rippleBrightenTextView];

	//: 描述_4
	[self.contentView addSubview:self.breezeWispTranquilLabel];


    //: 描述_5
    UIButton *melodyAmazingYield = [UIButton new];
    UIImage *wanderer = [UIImage imageNamed:@"images/icon_5.png"];
    if (wanderer) {
	    [melodyAmazingYield setImage:wanderer forState:UIControlStateNormal];
    }
    [melodyAmazingYield setTitle:@"button_5" forState:UIControlStateNormal];
    [melodyAmazingYield setTitle:@"button_selected_5" forState:UIControlStateSelected];
    [melodyAmazingYield setTitleColor:[UIColor colorWithRed:131/255.0 green:13/255.0 blue:169/255.0 alpha:0.6] forState:UIControlStateNormal];
    [melodyAmazingYield setTitleColor:[UIColor colorWithRed:163/255.0 green:75/255.0 blue:0/255.0 alpha:0.6] forState:UIControlStateSelected];
    [melodyAmazingYield addTarget:self action:@selector(action_5) forControlEvents:UIControlEventTouchUpInside];
    self.arcaneButton = melodyAmazingYield;
    [self.contentView addSubview:melodyAmazingYield];
	[self.arcaneButton mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(136);
		make.height.mas_equalTo(59);
	}];


    //: 描述_6
    UITextField *cascade = [[UITextField alloc] initWithFrame:CGRectZero];
    self.wanderTextField = cascade;
    [self.contentView addSubview:cascade];
	[self.wanderTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(72);
		make.height.mas_equalTo(101);
		make.top.equalTo(@(16));
	}];

	//: 描述_7
	[self.contentView addSubview:self.elusiveZipperButton];


    //: 描述_8
    UILabel *xenophobe = [[UILabel alloc] initWithFrame:CGRectZero];
    xenophobe.text = @"label_8";
    xenophobe.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
    xenophobe.textColor = [UIColor colorWithRed:50/255.0 green:143/255.0 blue:48/255.0 alpha:0.8];
    xenophobe.textAlignment = NSTextAlignmentLeft;
    //: UILabel的骚操作 充数
    xenophobe.numberOfLines = [self nightfall:2 graspUnwind:@"kiteQuaintKingdom"];
    self.nostalgicBlazeLabel = xenophobe;
    [self.contentView addSubview:xenophobe];
	[self.nostalgicBlazeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(137);
		make.height.mas_equalTo(129);
		make.bottom.equalTo(@(13));
	}];
}


@end